import { Module } from "@nestjs/common";
import { GatewayController } from "./gateway.controller";
import { GatewayService } from "./gateway.service";
import { configuration } from "../../../config/config";
import { UserModule } from "./user/user.module";
import { PrismaModule, PrismaService } from "@app/prisma";
import { EtcdModule } from "@app/etcd";

import { WsModule } from "./ws/ws.module";
import { NatsClientModule } from "@app/nats-client";
import { ShareModule } from "./share/share.module";
import { LogModule } from "@app/log";
import { EnumMicroService } from "../../../types/types";
import { GateAuthModule } from "./gateAuth/gateAuth.module";
import { AuthModule } from "@app/auth";
import { ProxyService } from './proxy/proxy.service';

@Module({
  imports: [
    AuthModule,
    LogModule.register(EnumMicroService.gateway),
    ShareModule.forRoot(),
    NatsClientModule.forRoot(configuration.gateway.nats_client_name),
    UserModule,
    GateAuthModule,
    PrismaModule,
    WsModule.forRoot(),
    EtcdModule.register(configuration.gateway.etcd_service_name),
  ],
  controllers: [GatewayController],
  providers: [
    GatewayService,
    PrismaService,
    ProxyService,
  ],
})
export class GatewayModule {}
